home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_bumptalk.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  60 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_shipdoorStuck.cog
  4. #
  5. # Locked Ships Rotating Door Script
  6. #
  7. # [DS]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # =======================================================================================
  12.  
  13. symbols
  14.     message    startup
  15.     message    touched
  16.     message    taken    
  17.  
  18.        thing        bumpit0
  19.     thing        stopit0
  20.  
  21.     sound        bumpwav0=
  22.     sound        bumpwav1=
  23.     thing        player                        local
  24.     int        talking=0                        local
  25.     int        sndnum                        local
  26.     int        numsounds=2                        local
  27.     int        tryit                            local
  28.  
  29. end
  30.  
  31. # ========================================================================================
  32.  
  33. code
  34. startup:
  35.     player = GetLocalPlayerThing();
  36.     return;
  37.  
  38. taken:
  39.     if(getsenderref() == stopit0)
  40.     {
  41.     talking=2;
  42. #    printint(talking);
  43.     }
  44.     return;
  45.  
  46. touched:
  47.     if (GetSenderRef() != bumpit0) return;
  48.     if(talking >= 1) return;
  49.     sndnum = rand()*numsounds;
  50.     talking=1;
  51.     tryit = PlayVoice(player, bumpwav0[sndnum], 1.0, 0);
  52.     WaitForSound(tryit);
  53.     sleep(10);
  54.     if(talking == 2) return;
  55.     talking=0;
  56.     return;
  57.  
  58. end
  59.  
  60.